package file;

import java.io.File;
import java.io.FileFilter;

public class Test {
    public static void main(String[] args) {

            File dir = new File("./src/main/java/file");
            if (dir.isDirectory()) {
                FileFilter filter = new FileFilter() {
                    @Override
                    public boolean accept(File pathname) {
                       long len = pathname.length();
                        return len<350;
                    }
                };
                File[] subs = dir.listFiles(filter);
                for (File sub : subs) {
                    System.out.println(sub.getName());
                }
            }
        }
    }

